/*foodclerk.h*/
#ifndef FOODCLERK_H
#define FOODCLERK_H

struct FoodClerk{
	int index;
	int replyTo;
	int msgLock;
	int myName;
	int sleepCon;
	int lineLength;
	
	int moneyCollected;
	int onBreak;
	int popcornRequested, sodaRequested, money;
	/*Possible statuses for FoodClerk: {Idle, WaitingForCust,  WaitingForPay, TalkingToManager, OnBreak}*/
	int status;
	int POPCORN_PRICE;
	int SODA_PRICE;
	int runScheduler;
	int numMsgs;
	struct Message tempMsg;
	struct Message msgList[3];
};

void FoodClerk_Scheduler(int index);
struct Message FoodClerk_GetMessage(int index, int name);

int FoodClerk_CallNextInLine(int index);
void FoodClerk_AcceptPopcornRequest(int index, int cust);
void FoodClerk_AcceptSodaRequest(int index, int cust);
void FoodClerk_GiveFood(int index, int cust);
void FoodClerk_GiveManagerMoney(int index);
void FoodClerk_TellStatus(int index);
void FoodClerk_ContinueOn(int index);
void FoodClerk_GoOnBreak(int index);
void FoodClerk_ComeOffBreak(int index);

#endif